home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / sound / vdigit.zip / VRMOD.DOC < prev    next >
Text File  |  1989-06-24  |  5KB  |  154 lines

  1. ------------------------------------------------------------------------------
  2.  
  3. Initialization routine
  4. ----------------------
  5.  
  6. Declaration:
  7.  
  8. short pascal far RVOICE_INIT(void)
  9.  
  10.  
  11. This must be called once before any of the other routines are called. It hooks
  12. the interrupt service routine into the timer tick interrupt vector.
  13.  
  14.  
  15. Return value        Meaning
  16. ------------        -------
  17.      0              success
  18.      1              voice package already initialized
  19.      2              wrong CPU, won't run on 8088 or 8086
  20.  
  21. NOTE:  RVOICE_INIT installs a Control-Break (Int 23h) handler which makes sure
  22.        that the 8253 timer chip and the timer tick vector are restored to
  23.        their original state before program termination. If your program
  24.        installs its own Int 23h handler, then (a) It should be done after
  25.        the call to RVOICE_INIT, and (b) It must call RVOICE_CBREAK before it
  26.        allows the program to terminate. Failure to do this will result in
  27.        a system crash.
  28.  
  29.  
  30. ------------------------------------------------------------------------------
  31.  
  32. Cleanup routine
  33. ---------------
  34.  
  35. Declaration:
  36.  
  37. short pascal far RVOICE_CLEANUP(void)
  38.  
  39.  
  40. This restores the timer tick interrupt vector to its previous state. This
  41. routine must be called before the main program exits to DOS, unless the main
  42. program is memory-resident.
  43.  
  44.  
  45. Return value        Meaning
  46. ------------        -------
  47.      0              success
  48.      1              voice package was not in the initialized state
  49.  
  50.  
  51. ------------------------------------------------------------------------------
  52.  
  53. Start routine
  54. -------------
  55.  
  56. Declaration:
  57.  
  58. short pascal far RVOICE_START(blockaddr,blocklen,
  59.                               filewrite,handle,port,startpos)
  60. unsigned char far *blockaddr;
  61. long blocklen;
  62. unsigned short filewrite;
  63. unsigned short handle;
  64. short port;
  65. long startpos;
  66.  
  67. This call initiates a voice input operation. It returns to the caller
  68. immediately. Voice input will continue asynchronously (background).
  69.  
  70.  
  71. Parameter   Size   Description
  72. ---------   ----   -----------
  73. blockaddr     4    A far pointer to the memory block used for voice data.
  74. blocklen      4    A dword indicating the length of the memory block.
  75. filewrite     2    A flag word. If this is 1, then data will be written to
  76.                     a file. If it is 0, then no file operations will be 
  77.                     performed.
  78. handle        2    An open file handle. This is ignored if the flag word
  79.                     is 0.
  80. port          2    The number (1 thru 4) of the COM port to be used for input.
  81. startpos      4    The byte offset within the memory block where recording
  82.                     will begin.
  83.  
  84. Return value        Meaning
  85. ------------        -------
  86.      0              success
  87.      1              block size is too small (blocklen < 8192 and 
  88.                      file write = yes)
  89.      2              voice recording is already in progress
  90.      3              a COM port number not within the range of 1 thru 4
  91.                      was specified
  92.      4              starting position is greater than block length
  93.  
  94.  
  95. ------------------------------------------------------------------------------
  96.  
  97. Catch-up routine
  98. ----------------
  99.  
  100. Declaration:
  101.  
  102. short pascal far RVOICE_CATCHUP(void)
  103.  
  104.  
  105. This must be called frequently from the main program if file writing is being
  106. used and the length of the data to be recorded is longer than the length of
  107. the memory block. The routine checks the progress of the address pointer in
  108. use by the interrupt service routine and writes new available data to the
  109. file.
  110.  
  111.  
  112. Return value        Meaning
  113. ------------        -------
  114.      0              success
  115.      1              no new data to write -- this is not an error; it just
  116.                      means that the file was already "up-to-date"
  117.      2              error while writing file
  118.  
  119.  
  120. ------------------------------------------------------------------------------
  121.  
  122. Stop routine
  123. ------------
  124.  
  125. Declaration:
  126.  
  127. void pascal far RVOICE_STOP(void)
  128.  
  129.  
  130. This must be called to terminate the voice input operations.
  131.  
  132.  
  133. ------------------------------------------------------------------------------
  134.  
  135. Status routine
  136. --------------
  137.  
  138. Declaration:
  139.  
  140. void pascal far RVOICE_STATUS(pcount,pindex)
  141. long far *pcount;
  142. long far *pindex;
  143.  
  144. This will report the status of voice operations.
  145.  
  146.  
  147. The first parameter is a far pointer to a dword which will receive the number
  148. of bytes which have been input.
  149.  
  150. The second parameter is a far pointer to a dword which will receive the
  151. offset within the block of the next byte to be filled by voice data input.
  152.  
  153.  
  154.